<template id="strawberry">
    <div>
        <div class="strawberry_buy">
            <div class="strawberry_orange">
                <img v-lazy="tag1_ad.url" alt="">
            </div>
            <div class="strawberry_orange_list">
                <dl v-for="s in tag1_list">
                    <dt>
                        <img class="img_l1" v-lazy="s.thumb" alt="" @click="getStr(s.id)">
                    </dt>
                    <dd>{{s.name}}</dd>
                    <dd><span>{{s.shop_price}}<time>{{s.goods_share}}</time></span><img src="../image/add.jpg" alt="" @click="addCart(s.id,s.thumb)"></dd>
                </dl>
            </div>
        </div>
    </div>
</template>
<script>
    export default {
        name :'strawberry',
        data(){
            return{
                /*   id:this.$route.query.this.ma.id,*/
                tag1_ad:[],
                tag1_list:[],
            }
        },
        mounted:function(){
            let mode1 = 'eight';
            this.GLOBAL.getList(this,mode1,1);
        },
        methods:{
            getStr:function(id){
                this.$router.push('/shopDetails?goods_id=' + id);
            },
			addCart:function (goods_id,image, number = 1) {
				this.GLOBAL.addCart(this,goods_id,number);
                this.GLOBAL.get_te(image);
			}
        }
    }
</script>
<style>
    .strawberry_orange_list{
        height:2.20rem;
        width:100%;
        display:flex;
        position:relative;
        /*flex-wrap: wrap;*/
        justify-content:flex-start;
    }
    .strawberry_orange_list dl{
        height:2.20rem;
        width:2.11rem;
        /*flex:1;*/
    }
    .strawberry_orange_list dl dt{
        height:1.54rem;
        width:2.11rem;
    }
    .strawberry_orange_list dl dd:nth-of-type(1){
        height:0.46rem;
        width:2.11rem;
        color:#333;
        font-size:0.2rem;
        text-indent: 0.28rem;
        line-height:0.46rem;
        overflow: hidden; /*自动隐藏文字*/
        text-overflow: ellipsis;/*文字隐藏后添加省略号*/
        white-space: nowrap;/*强制不换行*/
    }
    .strawberry_orange_list dl dd:nth-of-type(2){
        width:2.11rem;
        height:0.46rem;
        position: relative;
    }
    .strawberry_orange_list dl dd:nth-of-type(2) span{
        color:#ff7e67;
        font-size:0.18rem;
        display:block;
        width:2.5rem;
        text-indent:0.3rem;
    }
    .strawberry_orange_list dl dd:nth-of-type(2) img{
        display:block;
        height:0.23rem;
        width:0.23rem;
        position:absolute;
        top:-1px;
        left:1.65rem;
    }
    .strawberry_orange_list dl dt img{
        height:1.54rem;
        width:1.54rem;
        display:block;
        margin:0 auto;
    }
    .strawberry_buy{
        min-height:1.8rem;
        width:100%;
        padding-bottom:0.2rem;
    }

    .strawberry_buy h1{
        font-size:0.28rem;
        color: #4a4a4a;
        height:0.42rem;
        line-height:0.42rem;
        text-align:center;
        width:100%;
        position:relative;

    }
    .strawberry_buy img{
        display:inline-block;
        width:1.86rem;
        height:0.42rem;
    }
    .strawberry_buy p{
        height:0.3rem;
        line-height:0.3rem;
        text-align:center;
        color:#afafaf;
        font-size:0.16rem;
    }
    .strawberry_orange{
        height:2.8rem;
        width:100%;
       /* position:relative;*/
        margin-bottom:0.3rem;
    }
    .strawberry_orange img{
        height:2.8rem;
        width:100%;
        display:block;
    }
</style>
